import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'

import Audio from '../pages/Audio/audio.vue'
import Broadcast from '../pages/Broadcast/broadcast.vue'
import Group from '../pages/Group/group.vue'
import Home from '../pages/Home/home.vue'
import Mine from '../pages/Mine/mine.vue'
import Film from '../components/film.vue'
import Tv from '../components/tv.vue'
import City from '../components/city.vue'
import Read from '../components/read.vue'
import Music from '../components/music.vue'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home
    },
    {
      path: '/audio',
      name: 'Audio',
      component: Audio,
      // 定义二级路由
      children: [
        {path: '', component: Film},
        {path: 'film', component: Film},
        {path: 'tv', component: Tv},
        {path: 'city', component: City},
        {path: 'read', component: Read},
        {path: 'music', component: Music}
      ]
    },
    {
      path: '/broadcast',
      name: 'Broadcast',
      component: Broadcast
    },
    {
      path: '/group',
      name: 'Group',
      component: Group
    },
    {
      path: '/home',
      name: 'Home',
      component: Home
    },
    {
      path: '/mine',
      name: 'Mine',
      component: Mine
    },
  ]
})
